#!/usr/bin/env python
# -*- coding: utf-8 -*-

from google.appengine.api import users
from application import models

class Bootstrap:
    def bootstrap(self):
        if 'userKey' in self.session:
            self.view.member = models.User.get_by_key_name(self.session['userKey'])
        else:
            self.view.login_url = users.create_login_url('/user/auth?curl=%s' % self.request.path)